import datetime
import re
# from pyecharts.faker import Faker
import requests
import csv

"""
28227593 龙潭虎穴 李连杰胡凯莉争夺黑钻
保存龙潭虎穴成功！
28235081 鲨卷风5：全球鲨暴 鲨鱼叕从天而降
保存鲨卷风5：全球鲨暴成功！
失败的页面id： ['28371228']
28371228 页面访问失败
Traceback (most recent call last):
File "D:\he-project\爬虫\Test\hadoop数据采集\2.提取电影详细信息.py", line 148, in <module>
deal_fail(failList)
File "D:\he-project\爬虫\Test\hadoop数据采集\2.提取电影详细信息.py", line 29, in deal_fail
if list > 0:
TypeError: '>' not supported between instances of 'list' and 'int'
"""


def get_result():
    with open("re.json", mode='r', encoding='utf-8', newline='') as f:
        string = f.read()
    # print(string)
    # 解析对象
    obj = re.compile(r"<div class='swiper-slide'>.*?nbs.(?P<test>.*?)</a>", re.S)
    # 开始匹配
    result = obj.finditer(string)
    for item in result:
        test = item.group('test')
        print(test)


def get_subpage_url():
    pass


# url = "https://www.baidu.com"
# resp = requests.get(url)
# resp.encoding = resp.apparent_encoding
# print(resp.text)

# url = 'https://www.baidu.com'
# resp = requests.get(url)
# resp.encoding = resp.apparent_encoding
# print()

# a = '长评)'
# print(a.__contains__("("))
# print(a.split("(")[1].split(")")[0])

# import pandas as pd
# df = pd.read_excel('旅游景点.xlsx')
# df.head()
#
# x,y = df['城市']
# print(x)

from datetime import *

print(datetime.now())
